package net.dopan.pigframe.user.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;

import java.io.Serializable;

/**
 * @author wufeihong
 * 用户关注表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user_concern_user")
public class UserConcernUser extends Model<UserConcernUser> {

  private static final long serialVersionUID = 1L;

  /**
   * 关注Id
   */
  @TableId(value = "collect_id", type = IdType.AUTO)
  private long concernId;
  /**
   * 关注人Id
   */
  @TableField("user_id")
  private long userId;
  /**
   * 被关注人Id
   */
  @TableField("concern_user_id")
  private long concernUserId;

  @Override
  protected Serializable pkVal() {
    return this.concernId;
  }
}
